package com.dragon.modules.yuegou.query.merchant;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.merchant.MerchantSalesMonthEntity;
import com.dragon.modules.yuegou.enums.merchant.MerchantSalesMonthSource;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 商铺销售额按月 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-07-11 14:42:53
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class MerchantSalesMonthQuery extends MerchantSalesMonthEntity implements Query<MerchantSalesMonthEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商圈id查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 销售预算查询条件 */
	@JsonUnwrapped(prefix = "salesBudget")
	private Condition<BigDecimal> salesBudgetCondition;

    /** 商户id查询条件 */
	@JsonUnwrapped(prefix = "merchantId")
	private Condition<String> merchantIdCondition;

    /** 统计时间查询条件 */
	@JsonUnwrapped(prefix = "statisticalTime")
	private Condition<LocalDateTime> statisticalTimeCondition;

    /** 租金及管理费查询条件 */
	@JsonUnwrapped(prefix = "rentalManageFee")
	private Condition<BigDecimal> rentalManageFeeCondition;

    /** [枚举]来源：0-后台导入-CRM、1-后台抓取-MINIAPP查询条件 */
	@JsonUnwrapped(prefix = "source")
	private Condition<MerchantSalesMonthSource> sourceCondition;

    /** 是否任务统计，0表示未统计, 1表示已统计查询条件 */
	@JsonUnwrapped(prefix = "isCount")
	private Condition<Boolean> isCountCondition;

    /** 月份查询条件 */
	@JsonUnwrapped(prefix = "month")
	private Condition<LocalDate> monthCondition;

    /** 逻辑删除，1表示已删除,0表示未删除查询条件 */
	@JsonUnwrapped(prefix = "del")
	private Condition<Boolean> delCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 创建人查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 修改时间查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

    /** 修改人查询条件 */
	@JsonUnwrapped(prefix = "modifiedBy")
	private Condition<String> modifiedByCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public MerchantSalesMonthQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public MerchantSalesMonthQuery(MerchantSalesMonthEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public MerchantSalesMonthQuery(MerchantSalesMonthQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.salesBudgetCondition != null) {
			this.salesBudgetCondition = other.salesBudgetCondition.copy();
		}
		if(other.merchantIdCondition != null) {
			this.merchantIdCondition = other.merchantIdCondition.copy();
		}
		if(other.statisticalTimeCondition != null) {
			this.statisticalTimeCondition = other.statisticalTimeCondition.copy();
		}
		if(other.rentalManageFeeCondition != null) {
			this.rentalManageFeeCondition = other.rentalManageFeeCondition.copy();
		}
		if(other.sourceCondition != null) {
			this.sourceCondition = other.sourceCondition.copy();
		}
		if(other.isCountCondition != null) {
			this.isCountCondition = other.isCountCondition.copy();
		}
		if(other.monthCondition != null) {
			this.monthCondition = other.monthCondition.copy();
		}
		if(other.delCondition != null) {
			this.delCondition = other.delCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
		if(other.modifiedByCondition != null) {
			this.modifiedByCondition = other.modifiedByCondition.copy();
		}
	}

	@Override
	public QueryWrapper<MerchantSalesMonthEntity> toQueryWrapper() {
		QueryWrapper<MerchantSalesMonthEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (salesBudgetCondition != null) {
			salesBudgetCondition.toWrapper(wrapper, COL_SALES_BUDGET);
		}
		if (merchantIdCondition != null) {
			merchantIdCondition.toWrapper(wrapper, COL_MERCHANT_ID);
		}
		if (statisticalTimeCondition != null) {
			statisticalTimeCondition.toWrapper(wrapper, COL_STATISTICAL_TIME);
		}
		if (rentalManageFeeCondition != null) {
			rentalManageFeeCondition.toWrapper(wrapper, COL_RENTAL_MANAGE_FEE);
		}
		if (sourceCondition != null) {
			sourceCondition.toWrapper(wrapper, COL_SOURCE);
		}
		if (isCountCondition != null) {
			isCountCondition.toWrapper(wrapper, COL_IS_COUNT);
		}
		if (monthCondition != null) {
			monthCondition.toWrapper(wrapper, COL_MONTH);
		}
		if (delCondition != null) {
			delCondition.toWrapper(wrapper, COL_DEL);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		if (modifiedByCondition != null) {
			modifiedByCondition.toWrapper(wrapper, COL_MODIFIED_BY);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商圈id查询条件
	 * 
	 * @return busdIdCondition 商圈id查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取商圈id查询条件
	 * 
	 * @return busdIdCondition 商圈id查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈id查询条件
	 * 
	 * @param busdIdCondition 商圈id查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回销售预算查询条件
	 * 
	 * @return salesBudgetCondition 销售预算查询条件
	 */
	public Condition<BigDecimal> salesBudget() {
		this.salesBudgetCondition = new Condition<>();
		return this.salesBudgetCondition;
	}
	
	/**
	 * 获取销售预算查询条件
	 * 
	 * @return salesBudgetCondition 销售预算查询条件
	 */
	public Condition<BigDecimal> getSalesBudgetCondition() {
		return salesBudgetCondition;
	}

	/**
	 * 设置销售预算查询条件
	 * 
	 * @param salesBudgetCondition 销售预算查询条件
	 */
	public void setSalesBudgetCondition(Condition<BigDecimal> salesBudgetCondition) {
		this.salesBudgetCondition = salesBudgetCondition;
	}

	/**
	 * 构造并返回商户id查询条件
	 * 
	 * @return merchantIdCondition 商户id查询条件
	 */
	public Condition<String> merchantId() {
		this.merchantIdCondition = new Condition<>();
		return this.merchantIdCondition;
	}
	
	/**
	 * 获取商户id查询条件
	 * 
	 * @return merchantIdCondition 商户id查询条件
	 */
	public Condition<String> getMerchantIdCondition() {
		return merchantIdCondition;
	}

	/**
	 * 设置商户id查询条件
	 * 
	 * @param merchantIdCondition 商户id查询条件
	 */
	public void setMerchantIdCondition(Condition<String> merchantIdCondition) {
		this.merchantIdCondition = merchantIdCondition;
	}

	/**
	 * 构造并返回统计时间查询条件
	 * 
	 * @return statisticalTimeCondition 统计时间查询条件
	 */
	public Condition<LocalDateTime> statisticalTime() {
		this.statisticalTimeCondition = new Condition<>();
		return this.statisticalTimeCondition;
	}
	
	/**
	 * 获取统计时间查询条件
	 * 
	 * @return statisticalTimeCondition 统计时间查询条件
	 */
	public Condition<LocalDateTime> getStatisticalTimeCondition() {
		return statisticalTimeCondition;
	}

	/**
	 * 设置统计时间查询条件
	 * 
	 * @param statisticalTimeCondition 统计时间查询条件
	 */
	public void setStatisticalTimeCondition(Condition<LocalDateTime> statisticalTimeCondition) {
		this.statisticalTimeCondition = statisticalTimeCondition;
	}

	/**
	 * 构造并返回租金及管理费查询条件
	 * 
	 * @return rentalManageFeeCondition 租金及管理费查询条件
	 */
	public Condition<BigDecimal> rentalManageFee() {
		this.rentalManageFeeCondition = new Condition<>();
		return this.rentalManageFeeCondition;
	}
	
	/**
	 * 获取租金及管理费查询条件
	 * 
	 * @return rentalManageFeeCondition 租金及管理费查询条件
	 */
	public Condition<BigDecimal> getRentalManageFeeCondition() {
		return rentalManageFeeCondition;
	}

	/**
	 * 设置租金及管理费查询条件
	 * 
	 * @param rentalManageFeeCondition 租金及管理费查询条件
	 */
	public void setRentalManageFeeCondition(Condition<BigDecimal> rentalManageFeeCondition) {
		this.rentalManageFeeCondition = rentalManageFeeCondition;
	}

	/**
	 * 构造并返回[枚举]来源：0-后台导入-CRM、1-后台抓取-MINIAPP查询条件
	 * 
	 * @return sourceCondition [枚举]来源：0-后台导入-CRM、1-后台抓取-MINIAPP查询条件
	 */
	public Condition<MerchantSalesMonthSource> source() {
		this.sourceCondition = new Condition<>();
		return this.sourceCondition;
	}
	
	/**
	 * 获取[枚举]来源：0-后台导入-CRM、1-后台抓取-MINIAPP查询条件
	 * 
	 * @return sourceCondition [枚举]来源：0-后台导入-CRM、1-后台抓取-MINIAPP查询条件
	 */
	public Condition<MerchantSalesMonthSource> getSourceCondition() {
		return sourceCondition;
	}

	/**
	 * 设置[枚举]来源：0-后台导入-CRM、1-后台抓取-MINIAPP查询条件
	 * 
	 * @param sourceCondition [枚举]来源：0-后台导入-CRM、1-后台抓取-MINIAPP查询条件
	 */
	public void setSourceCondition(Condition<MerchantSalesMonthSource> sourceCondition) {
		this.sourceCondition = sourceCondition;
	}

	/**
	 * 构造并返回是否任务统计，0表示未统计, 1表示已统计查询条件
	 * 
	 * @return isCountCondition 是否任务统计，0表示未统计, 1表示已统计查询条件
	 */
	public Condition<Boolean> isCount() {
		this.isCountCondition = new Condition<>();
		return this.isCountCondition;
	}
	
	/**
	 * 获取是否任务统计，0表示未统计, 1表示已统计查询条件
	 * 
	 * @return isCountCondition 是否任务统计，0表示未统计, 1表示已统计查询条件
	 */
	public Condition<Boolean> getIsCountCondition() {
		return isCountCondition;
	}

	/**
	 * 设置是否任务统计，0表示未统计, 1表示已统计查询条件
	 * 
	 * @param isCountCondition 是否任务统计，0表示未统计, 1表示已统计查询条件
	 */
	public void setIsCountCondition(Condition<Boolean> isCountCondition) {
		this.isCountCondition = isCountCondition;
	}

	/**
	 * 构造并返回月份查询条件
	 * 
	 * @return monthCondition 月份查询条件
	 */
	public Condition<LocalDate> month() {
		this.monthCondition = new Condition<>();
		return this.monthCondition;
	}
	
	/**
	 * 获取月份查询条件
	 * 
	 * @return monthCondition 月份查询条件
	 */
	public Condition<LocalDate> getMonthCondition() {
		return monthCondition;
	}

	/**
	 * 设置月份查询条件
	 * 
	 * @param monthCondition 月份查询条件
	 */
	public void setMonthCondition(Condition<LocalDate> monthCondition) {
		this.monthCondition = monthCondition;
	}

	/**
	 * 构造并返回逻辑删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @return delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public Condition<Boolean> del() {
		this.delCondition = new Condition<>();
		return this.delCondition;
	}
	
	/**
	 * 获取逻辑删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @return delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public Condition<Boolean> getDelCondition() {
		return delCondition;
	}

	/**
	 * 设置逻辑删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @param delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public void setDelCondition(Condition<Boolean> delCondition) {
		this.delCondition = delCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回创建人查询条件
	 * 
	 * @return createdByCondition 创建人查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取创建人查询条件
	 * 
	 * @return createdByCondition 创建人查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置创建人查询条件
	 * 
	 * @param createdByCondition 创建人查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回修改时间查询条件
	 * 
	 * @return modifiedTimeCondition 修改时间查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取修改时间查询条件
	 * 
	 * @return modifiedTimeCondition 修改时间查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置修改时间查询条件
	 * 
	 * @param modifiedTimeCondition 修改时间查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

	/**
	 * 构造并返回修改人查询条件
	 * 
	 * @return modifiedByCondition 修改人查询条件
	 */
	public Condition<String> modifiedBy() {
		this.modifiedByCondition = new Condition<>();
		return this.modifiedByCondition;
	}
	
	/**
	 * 获取修改人查询条件
	 * 
	 * @return modifiedByCondition 修改人查询条件
	 */
	public Condition<String> getModifiedByCondition() {
		return modifiedByCondition;
	}

	/**
	 * 设置修改人查询条件
	 * 
	 * @param modifiedByCondition 修改人查询条件
	 */
	public void setModifiedByCondition(Condition<String> modifiedByCondition) {
		this.modifiedByCondition = modifiedByCondition;
	}

}
